﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DataFrameworkAccess.Entity;
using System.Data;
using Xinkui.Common.FileAction;
using Xinkui.Common.Enum;

namespace Back.Xinkui.Entity.Company
{
    public class CertificateEntity
    {
        [DataMapping("CertID", DbType.Int32)]
        public int CertID { get; set; }


        [DataMapping("CompanyID", DbType.Int32)]
        public int CompanyID { get; set; }


        [DataMapping("CertName", DbType.String)]
        public string CertName { get; set; }


        [DataMapping("PicPath", DbType.String)]
        public string PicPath { get; set; }


        public string viewImage
        {
            get
            {
                string certImg = FileFactory.BrowerFile(PicPath, ESourceType.FromCertification, 100, 100);
                return string.IsNullOrEmpty(certImg) ? "/Themes/default/images/Img/noimage.jpg" : certImg;


            }
        }

        [DataMapping("Remark", DbType.String)]
        public string Remark { get; set; }


        [DataMapping("CreateDate", DbType.DateTime)]
        public DateTime CreateDate { get; set; }


        [DataMapping("UpdateDate", DbType.DateTime)]
        public DateTime UpdateDate { get; set; }


        [DataMapping("AuditStatus", DbType.Int32)]
        public int AuditStatus { get; set; }


        [DataMapping("AuditDate", DbType.DateTime)]
        public DateTime AuditDate { get; set; }


        [DataMapping("IsDeleted", DbType.Int32)]
        public int IsDeleted { get; set; }

    }
}
